const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const { BaseParameter } = require('../base/model')

const productSchema = new Schema({
  ...BaseParameter,
  /**
   * 项目名称
   */
  "name": {type: String, default: ''},
  /**
   * 项目图标
   */
  "cover": {type: String, default: ''},
  /**
   * 版本
   */
  "version": {type: String, default: ''},
  /**
   * 项目类型
   */
  "type": {type: String, default: ''},
  /**
   * 内容
   */
  "content": {type: String, default: ''},
  /**
   * 描述
   */
  "describe": {type: String, default: ''},
  /**
   * 项目地址
   */
  "url": {type: String, default: ''},
  /**
   * 项目开始时间
   */
  "startDate": {type: Date},
  /**
   * 项目结束时间
   */
  "endDate": {type: Date},
  /**
   * 是否在个人界面显示
   */
  "isShow": {type: Boolean, default: false}
});

const Production = mongoose.model('Production', productSchema, 'productions');

module.exports = Production
